//登录信息表单验证开始
	$(function(){
		var validate=$("#myform").validate({
			rules:{
				user:{
					required:true
				},
				psd:{
					required:true,
					minlength:6,
					maxlength:12
				}
			},
			messages:{
//				keeplogin:"请选择！"
			},
			errorPlacement: function(error, element) { 
			    if ( element.is(":radio") ) 
			        error.appendTo ( element.parent() ); 
			    else if ( element.is(":checkbox") ) 
			        error.appendTo ( element.parent().parent() ); 
			    else 
			        error.insertAfter(element); 
			},
		})
	})
//登录信息表单验证结束
//鼠标经过型号效果开始
	function modelover(obj) {
		var div = $(obj).parents(".am-u-sm-3");
		div.siblings().find("p a").css("color", "#8c8c8c");
		div.siblings().children().children().css("color", "#8c8c8c");
		div.children().children().css("color", "#8c8c8c");
		$(obj).siblings().children().css("color", "#8c8c8c");
		$(obj).parent().siblings().css("color", "#8c8c8c");
	}

	function modelout(obj) {
			var div = $(obj).parents(".am-u-sm-3");
			div.siblings().find("p a").css("color", "#343740");
			div.siblings().children().children().css("color", "#343740");
			div.children().children().css("color", "#343740");
			$(obj).siblings().children().css("color", "#343740");
			$(obj).parent().siblings().css("color", "#343740");
		}
//鼠标经过型号效果结束

////导航条效果开始
//	$(function() {
//		setSlip();
//	});
//	var setSlip = function() {
//		var slip = $('#navslip');
//		var a = $('.am-topbar-nav li:first');
//		//初始化滑块  
//		slip.css({
//			'width': a.width(),
//			'left': parseInt(a.position().left) + 4 + 'px'
//		});
//		$('.am-topbar-nav li').mouseenter(function() {
//			//显示滑块  
//			if (slip.css('display') == 'none') {
//				slip.show();
//			}
//			//移动滑块  
//			slip.stop().animate({
//				width: $(this).width(),
//				left: parseInt($(this).position().left) + 4 + 'px'
//			}, 300);
//		});
//	};
////导航条效果结束
//在线咨询效果开始
	$(function() {
//		$(".suspend").animate({
//			width: 30
//		}, 400);
		$(".suspend").css("width","30px");
		$(".suspend").mouseover(function() {
			$(this).stop();
			$(this).animate({
				width: 348
			}, 400);
		});
		$(".suspend").mouseout(function() {
			$(this).stop();
			$(this).animate({
				width: 30
			}, 400);
		});
	});
//在线咨询效果结束
//左侧导航条效果开始
//	$(function() {
//		$(".left_ul li").animate({
//			width: 100
//		}, 400);
//		$(".left_ul li").mouseover(function() {
//			$(this).stop();
//			$(this).animate({
//				width: 200
//			}, 400);
//		});
//		$(".left_ul li").mouseout(function() {
//			$(this).stop();
//			$(this).animate({
//				width: 100
//			}, 400);
//		});
//	});
$(function() {
	$(".left_li").mouseover(function() {
		$(this).find(".sliderbg").stop(false, false).animate({
			width: '100%'
		}, 300);
		$(this).siblings().find(".sliderbg").stop(false, false).animate({
			width: '0px'
		}, 300);
	})
	$(".left_li").mouseout(function(){
		$(this).find(".sliderbg").stop(false, false).animate({
			width: '0px'
		}, 300);
	})
})
//左侧导航条效果结束
//百叶窗效果开始
	function accordionover(obj){
		$(obj).children(".accordion_img_down").css("display","block");
	}
	function accordionout(obj){
		$(obj).children(".accordion_img_down").css("display","none");
	}	
//百叶窗效果结束



$(document).ready(function() {
	//点击登录按钮效果开始
	$(".loginbtn").click(function(){
		$(this).addClass("am-active");
	})
	//点击登录按钮效果结束
	//鼠标经过“产品”效果开始
	$("#nav_brand").mouseover(function() {
		if($(".index_brand_bg").css("display")=="none"){
			$(".index_brand_bg").slideDown();
			$(".boxshadow").fadeIn();
		}else{
			$(".index_brand_bg").show();
		}
		
	});
	$("#nav_brand").parent().next().children().hover(function(){
		$(".index_brand_bg").slideUp();
		$(".boxshadow").fadeOut();
	})
	$(".index_brand_bg").hover(function() {
		$(this).show();
	}, function() {
		$(this).slideUp();
		$(".boxshadow").fadeOut();
	})
	//鼠标经过“产品”效果结束
	
	//底部固底开始
	var topbar_height=$(".rolls").height();
	var footer_height=$(".amz-footer").height();
	var _height=$(window).height();
//	alert(topbar_height);
//	alert(footer_height);
	$(".container").css("height",_height-topbar_height-footer_height+77);
	//底部固底结束
	
	
	
	var _width = $(window).width();
	if(_width < 640)
	{
		$(".foot_null").hide();
		$(".foot_server").removeClass("foot_left").addClass("foot_center");
		$("body").css("font-size","1.4em");
		$(".am-topbar-nav > li > a").css("line-height","30px");
		$(".index_content").css("margin","1em auto");
		$(".bottom").css("line-height","2");
		$(".technical_ul li").css("width","25%");
		$(".technical_ul div").css("width","25%");
//		$(".technical_ul a").css("font-size","1em");
//		$(".technical_ul span").css("font-size","1em");
		$(".modelpic").hide();
		$(".am-tabs-bd .technical0").css("padding","0");
		$(".am-tabs-d2 .technical_ul").css("padding","0 0 1em");
		$(".am-tabs-bd .technical1").css("padding","1em 0");
//		$(".am-tabs-bd .technical2").css("height","auto");
//		$(".am-tabs-bd .technical3").css("height","auto");
		$(".radio_box").css("margin-bottom","0");
		$(".bottom a").css("padding","0 0.5em");
		$(".bottom span").css("padding","0 0.5em 0 0");
		$(".searchbar").css({"width":"100%","margin":"0"});
		$(".newsall_title").css({"white-space":"inherit","overflow":"inherit","text-overflow":"inherit"});
		$(".newsall_article").css({"white-space":"inherit","overflow":"inherit","text-overflow":"inherit"});
		$(".newsdetailpic").css("width","100%");
		$(".newsdetail_title").css("line-height","1.5");
		$(".index_brand_model").css({"padding-left":"0","text-align":"center"});
		$(".index_bottompic1").css({"padding-right":"1rem","padding-left":"1rem"});
		$(".index_bottompic2").css({"padding-left":"1rem","padding-right":"1rem"});
		$(".index_toppic1").css("padding-left","1rem");
		$(".index_toppic2").css("padding-right","1rem");
//		$(".right_content .am-u-lg-12").css("height","auto");
		$(".newstabs").css("height","auto");
		$("#phone_en").show();
		$("#pc_en").hide();
		$(".weixin_alert").css({"width":"265px","margin-left":"-135px"});
		$(".am-topbar-nav li").css("margin-left","5px");
		$(".index_login").css("margin","0 1em");
		$("#pc_news").hide();
		$("#phone_news").show();
		$(".app_box").css("margin","0 auto 3rem");
		$(".false_content").css("padding","20% 0 3rem");
		$(".false_pic").css({"position":"relative","top":"0","left":"0","margin":"0 auto 3rem"});
		$(".addr_form label").css("padding","0");
		$(".select_city").css("padding","0.2rem 0");
		$(".select_city img").css("right","0");
		$(".order_right").css({"height":"auto","min-height":"0"});
		$(".center_ul").css("margin-bottom","1rem");
		$(".order_table").addClass("am-u-sm-3").removeClass("order_table_pc");
		$(".order_table_pic").css("padding","0");
		$(".cost").css("padding","1rem 0");
		$(".orderListWord_ul").css("text-align","left");
		$(".orderListWord_ul .am-u-sm-12").css("text-align","left");
		$(".setname").css("width","90%");
	}
	else{
		$(".foot_null").show();
		$(".foot_server").removeClass("foot_center").addClass("foot_left");
		$("body").css("font-size","1.6em");
		$(".am-topbar-nav > li > a").css("line-height","60px");
		$(".index_content").css("margin","4em auto");
		$(".bottom").css("line-height","3");
		$(".technical_ul li").css("width","15%");
		$(".technical_ul div").css("width","15%");
//		$(".technical_ul a").css("font-size","18.67px");
//		$(".technical_ul span").css("font-size","18.67px");
		$(".modelpic").show();
		$(".am-tabs-bd .technical0").css("padding","4em 0.5em");
		$(".am-tabs-d2 .technical_ul").css("padding","0 1em 2.5em");
		$(".am-tabs-bd .technical1").css("padding","3em 7em 0 0");
//		$(".am-tabs-bd .technical2").css("height","600px");
//		$(".am-tabs-bd .technical3").css("height","600px");
		$(".radio_box").css("margin-bottom","2em");
		$(".bottom a").css("padding","0 2em");
		$(".bottom span").css("padding","0 2em 0 0");
		$(".searchbar").css({"width":"300px","margin":"3em 2em"});
		$(".newsall_title").css({"white-space":"nowrap","overflow":"hidden","text-overflow":"ellipsis"});
		$(".newsall_article").css({"white-space":"nowrap","overflow":"hidden","text-overflow":"ellipsis"});
		$(".newsdetailpic").css("width","289px");
		$(".newsdetail_title").css("line-height","3");
		$(".index_brand_model").css({"padding-left":"42%","text-align":"left"});
		$(".index_bottompic1").css({"padding-right":"0.5em","padding-left":"0"});
		$(".index_bottompic2").css({"padding-left":"0.5em","padding-right":"0"});
		$(".index_toppic1").css("padding-left","0");
		$(".index_toppic2").css("padding-right","0");
//		$(".right_content .am-u-lg-12").css("height","600px");
//		$(".newstabs").css("height","600px");
		$("#phone_en").hide();
		$("#pc_en").show();
		$(".weixin_alert").css({"width":"325px","margin-left":"-190px"});
		$(".am-topbar-nav li").css("margin-left","30px");
		$(".index_login").css("margin","2.15em 1em 0");
		$("#pc_news").show();
		$("#phone_news").hide();
		$(".app_box").css("margin","15rem auto 10rem");
		$(".false_content").css("padding","13% 0 0");
		$(".false_pic").css({"position":"absolute","top":"10rem","left":"7rem","margin":"0 auto"});
		$(".addr_form label").css("padding","0 1.5rem");
		$(".select_city").css("padding","0.2rem");
		$(".select_city img").css("right","0.2rem");
		$(".order_right").css({"height":"500px","min-height":"800px"});
		$(".center_ul").css("margin-bottom","15rem");
		$(".order_table").addClass("order_table_pc").removeClass("am-u-sm-3");
		$(".order_table_pic").css("padding","0 2rem");
		$(".cost").css("padding","1rem 0 1rem 2rem");
		$(".orderListWord_ul").css("text-align","center");
		$(".orderListWord_ul .am-u-sm-12").css("text-align","right");
		$(".setname").css("width","40%");
	}
	if(_width < 1008)
	{
		$("#indexpic1").css("height","auto");
	}
	else{
		$("#indexpic1").css("height","270px");
	}
	if(_width < 1050)
	{
		$(".am-topbar-collapse").css("width","100%");
		$(".right_title").css("text-align","center");
		$(".right").css({"border-left":"none","padding":"0","margin-top":"2em"});
		$(".content_title").css("text-align","center");
	}
	else{
		$(".am-topbar-collapse").css("width","auto");
		$(".right_title").css("text-align","left");
		$(".right").css({"border-left":"1px solid #d7d6d6","padding":"0 0 0 3em","margin-top":"0"});
		$(".content_title").css("text-align","left");
	}
});
window.onresize = resizeChange;
function resizeChange() {
	var _width = $(window).width();
	if(_width < 640)
	{
		$(".foot_null").hide();
		$(".foot_server").removeClass("foot_left").addClass("foot_center");
		$("body").css("font-size","1.4em");
		$(".am-topbar-nav > li > a").css("line-height","30px");
		$(".index_content").css("margin","1em auto");
		$(".bottom").css("line-height","2");
		$(".technical_ul li").css("width","25%");
		$(".technical_ul div").css("width","25%");
//		$(".technical_ul a").css("font-size","1em");
//		$(".technical_ul span").css("font-size","1em");
		$(".modelpic").hide();
		$(".am-tabs-bd .technical0").css("padding","0");
		$(".am-tabs-d2 .technical_ul").css("padding","0 0 1em");
		$(".am-tabs-bd .technical1").css("padding","1em 0");
//		$(".am-tabs-bd .technical2").css("height","auto");
//		$(".am-tabs-bd .technical3").css("height","auto");
		$(".radio_box").css("margin-bottom","0");
		$(".bottom a").css("padding","0 0.5em");
		$(".bottom span").css("padding","0 0.5em 0 0");
		$(".searchbar").css({"width":"100%","margin":"0"});
		$(".newsall_title").css({"white-space":"inherit","overflow":"inherit","text-overflow":"inherit"});
		$(".newsall_article").css({"white-space":"inherit","overflow":"inherit","text-overflow":"inherit"});
		$(".newsdetailpic").css("width","100%");
		$(".newsdetail_title").css("line-height","1.5");
		$(".index_brand_model").css({"padding-left":"0","text-align":"center"});
		$(".index_bottompic1").css({"padding-right":"1rem","padding-left":"1rem"});
		$(".index_bottompic2").css({"padding-left":"1rem","padding-right":"1rem"});
		$(".index_toppic1").css("padding-left","1rem");
		$(".index_toppic2").css("padding-right","1rem");
//		$(".right_content .am-u-lg-12").css("height","auto");
		$(".newstabs").css("height","auto");
		$("#phone_en").show();
		$("#pc_en").hide();
		$(".weixin_alert").css({"width":"265px","margin-left":"-135px"});
		$(".am-topbar-nav li").css("margin-left","5px");
		$(".index_login").css("margin","0 1em");
		$("#pc_news").hide();
		$("#phone_news").show();
		$(".app_box").css("margin","0 auto 3rem");
		$(".false_content").css("padding","20% 0 3rem");
		$(".false_pic").css({"position":"relative","top":"0","left":"0","margin":"0 auto 3rem"});
		$(".addr_form label").css("padding","0");
		$(".select_city").css("padding","0.2rem 0");
		$(".select_city img").css("right","0");
		$(".order_right").css({"height":"auto","min-height":"0"});
		$(".center_ul").css("margin-bottom","1rem");
		$(".order_table").addClass("am-u-sm-3").removeClass("order_table_pc");
		$(".order_table_pic").css("padding","0");
		$(".cost").css("padding","1rem 0");
		$(".orderListWord_ul").css("text-align","left");
		$(".orderListWord_ul .am-u-sm-12").css("text-align","left");
		$(".setname").css("width","90%");
	}
	else{
		$(".foot_null").show();
		$(".foot_server").removeClass("foot_center").addClass("foot_left");
		$("body").css("font-size","1.6em");
		$(".am-topbar-nav > li > a").css("line-height","60px");
		$(".index_content").css("margin","4em auto");
		$(".bottom").css("line-height","3");
		$(".technical_ul li").css("width","15%");
		$(".technical_ul div").css("width","15%");
//		$(".technical_ul a").css("font-size","18.67px");
//		$(".technical_ul span").css("font-size","18.67px");
		$(".modelpic").show();
		$(".am-tabs-bd .technical0").css("padding","4em 0.5em");
		$(".am-tabs-d2 .technical_ul").css("padding","0 1em 2.5em");
		$(".am-tabs-bd .technical1").css("padding","3em 7em 0 0");
//		$(".am-tabs-bd .technical2").css("height","600px");
//		$(".am-tabs-bd .technical3").css("height","600px");
		$(".radio_box").css("margin-bottom","2em");
		$(".bottom a").css("padding","0 2em");
		$(".bottom span").css("padding","0 2em 0 0");
		$(".searchbar").css({"width":"300px","margin":"3em 2em"});
		$(".newsall_title").css({"white-space":"nowrap","overflow":"hidden","text-overflow":"ellipsis"});
		$(".newsall_article").css({"white-space":"nowrap","overflow":"hidden","text-overflow":"ellipsis"});
		$(".newsdetailpic").css("width","289px");
		$(".newsdetail_title").css("line-height","3");
		$(".index_brand_model").css({"padding-left":"42%","text-align":"left"});
		$(".index_bottompic1").css({"padding-right":"0.5em","padding-left":"0"});
		$(".index_bottompic2").css({"padding-left":"0.5em","padding-right":"0"});
		$(".index_toppic1").css("padding-left","0");
		$(".index_toppic2").css("padding-right","0");
//		$(".right_content .am-u-lg-12").css("height","600px");
//		$(".newstabs").css("height","600px");
		$("#phone_en").hide();
		$("#pc_en").show();
		$(".weixin_alert").css({"width":"325px","margin-left":"-190px"});
		$(".am-topbar-nav li").css("margin-left","30px");
		$(".index_login").css("margin","2.15em 1em 0");
		$("#pc_news").show();
		$("#phone_news").hide();
		$(".app_box").css("margin","15rem auto 10rem");
		$(".false_content").css("padding","13% 0 0");
		$(".false_pic").css({"position":"absolute","top":"10rem","left":"7rem","margin":"0 auto"});
		$(".addr_form label").css("padding","0 1.5rem");
		$(".select_city").css("padding","0.2rem");
		$(".select_city img").css("right","0.2rem");
		$(".order_right").css({"height":"500px","min-height":"800px"});
		$(".center_ul").css("margin-bottom","15rem");
		$(".order_table").addClass("order_table_pc").removeClass("am-u-sm-3");
		$(".order_table_pic").css("padding","0 2rem");
		$(".cost").css("padding","1rem 0 1rem 2rem");
		$(".orderListWord_ul").css("text-align","center");
		$(".orderListWord_ul .am-u-sm-12").css("text-align","right");
		$(".setname").css("width","40%");
	}
	if(_width < 1008)
	{
		$("#indexpic1").css("height","auto");
	}
	else{
		$("#indexpic1").css("height","270px");
	}
	if(_width < 1050)
	{
		$(".am-topbar-collapse").css("width","100%");
		$(".right_title").css("text-align","center");
		$(".right").css({"border-left":"none","padding":"0","margin-top":"2em"});
		$(".content_title").css("text-align","center");
	}
	else{
		$(".am-topbar-collapse").css("width","auto");
		$(".right_title").css("text-align","left");
		$(".right").css({"border-left":"1px solid #d7d6d6","padding":"0 0 0 3em","margin-top":"0"});
		$(".content_title").css("text-align","left");
	}
	
}
